package com.example.strategytest.genericity;

/**
 * @author zbc
 * @description
 * @email
 * @date 2020/12/23 14:28
 */
public class Point<T, U> {

    private T x;
    private T y;

    private U name;

    public T getX() {
        return x;
    }

    public void setX(T x) {
        this.x = x;
    }

    public T getY() {
        return y;
    }

    public void setY(T y) {
        this.y = y;
    }

    public U getName() {
        return name;
    }

    public void setName(U name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                ", name=" + name +
                '}';
    }
}
class Test{
    public static void main(String[] args) {
        Point<Integer, String> point = new Point<>();
        point.setX(100);
        point.setY(100);
        point.setName("Jimi");

        System.out.println(point.toString());

    }


}
